![]() ![]() |
| The following review questions were covered in Labs 02
and 03 and are questions taken from the course website. NOT ALL questions
from the course website were discussed in lab. Please note that the information presented here does not necessarily represent a complete answer to the review question. The information is intended to spark student's memory for those who attended lab OR provide a base (hint) from where to start for those students who did not attend lab. | |||
To restore locality of records for sequential processing and to compact the file. |
|||
Create an index file and perform the binary search on it. |
|||
ADVANTAGE - only one file to keep track of (when a record is deleted the free space of both indices can be dealt with at the same time). DISADVANTAGE - because the indices are different sizes, we need to come up with a way of accessing the free list (more complicated). |
|||
ADVANTAGE - the index would be smaller, work is offloaded to the OS DISADVANTAGE - must deal with search for records within each block |
|||
PLACEMENT OF NEW RECORDS - would have to go at the end of the file EFFICIENCY OF SEARCHES - because of index, this will not be affected SEQUENTIAL FILE UPDATES - will not be possible (direct access will not be affected) FILE SIZE - will grow rapidly OVERALL PROCESSING SPEED - will degrade overtime (if file is large enough, may cause thrashing) |
|||
![]() |
| © Copyright 2002 |
| Questions? Please Email: gwen@cpsc.ucalgary.ca |
| Last modified October 7, 2002 |